package com.pshcp.common.enums;

/**
 * @Description: 反馈类型：0患者投诉建议1在线咨询反馈
 * @Author: xiaoche
 * @Date: 2022/10/29 12:36
 */
public enum FeedbackTypeEnum {

    SUGGEST(0, "患者投诉建议"),

    ONLINE_FB(1, "在线咨询反馈"),

    ;

    private Integer code;
    private String desc;

    FeedbackTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDescByCode(int code){
        for(FeedbackTypeEnum e : FeedbackTypeEnum.values()){
            if(e.getCode().intValue() == code){
                return e.getDesc();
            }
        }
        return null;
    }

}
